ext.define('extension.display', function() {

var utils = extension.utils;
var messages = extension.messages;
var preferences = extension.preferences;

function onInsert(e) {
    var q = preferences.get('flashquality');
    if (q)
        utils.setPluginParam(e, q, 'quality', q);
}

return {
    bind: function() {
        messages.listen({
            'insert': onInsert
        });
    }
};

});
